//
//  XRCommonOnlyButtontableCell.m
//  XClassRoom
//
//  Created by NeiQuan on 16/11/7.
//  Copyright © 2016年 Mr-yuwei. All rights reserved.
//

#import "XRCommonOnlyButtontableCell.h"

@implementation XRCommonOnlyButtontableCell
-(void)addOwnView
{
    _contentButton=[UIButton buttonWithType:UIButtonTypeCustom];
    [self.contentView addSubview:_contentButton];
    _contentButton .titleLabel.font=[UIFont systemFontOfSize:13];
    [_contentButton setBackgroundColor:kNavBarThemeColor];
    [_contentButton setTitleColor:kWhiteColor forState:UIControlStateNormal];
    _contentButton.layer.cornerRadius=5;
    _contentButton.layer.masksToBounds=YES;
    [_contentButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).insets(UIEdgeInsetsMake(5, 15, 5, 15));
    }];
    [_contentButton setTitle:@"确定" forState:UIControlStateNormal];
    [_contentButton addTarget:self action:@selector(onlybuttonClick:) forControlEvents:UIControlEventTouchUpInside];
}
-(void)onlybuttonClick:(UIButton *)sender
{
    if (_buttonBlock)
    {
        _buttonBlock();
    }
    
}
@end
